{% extends 'base.html' %}

{% block title %}首页{% endblock %}
{% block content %}
    <div class="bs-example" data-example-id="panel-with-list-group">
        <!-- Default panel contents -->
        <div class="media-body">
            <div class="panel-heading"><h3 style="text-align: center">问答列表</h3></div>
            <ul class="list-group">
                {% for question in questions %}
                    <li class="list-group-item">
                        <a href="{{ url_for('qa.detail', question_id=question.id) }}">{{ question.title }}</a>
                        <div class="media-body">
                            <p class="media-heading">{{ question.content|truncate(length=100) }}</p>
                        </div>
                        <p class=" text-right"><span>{{ question.author.username }}  &nbsp&nbsp&nbsp  </span> {{ question.create_time }}</p>
                    </li>
                {% endfor %}
            </ul>
        </div>

    </div>
{% endblock %}